package com.shine.chemicalWholeProcessSystem.ui.riskAssessment;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.lxj.xpopup.XPopup;
import com.lxj.xpopup.interfaces.OnSelectListener;
import com.shine.chemicalWholeProcessSystem.BR;
import com.shine.chemicalWholeProcessSystem.R;
import com.shine.chemicalWholeProcessSystem.app.Constants;
import com.shine.chemicalWholeProcessSystem.base.BaseActivity;
import com.shine.chemicalWholeProcessSystem.bean.RiskManagementBean;
import com.shine.chemicalWholeProcessSystem.databinding.ActivityRiskAssessmentCreateBinding;
import com.shine.chemicalWholeProcessSystem.databinding.ActivityRiskAssessmentDetailsBinding;
import com.shine.chemicalWholeProcessSystem.ui.riskManagement.RiskManagementCreateActivity;

import java.util.ArrayList;
import java.util.List;

public class RiskAssessmentDetailsActivity extends BaseActivity<ActivityRiskAssessmentDetailsBinding, RiskAssessmentDetailsViewModel> {
    private String id;

    @Override
    public int initContentView(Bundle savedInstanceState) {
        return R.layout.activity_risk_assessment_details;
    }

    @Override
    public int initVariableId() {
        return BR.viewModel;
    }

    @Override
    public RiskAssessmentDetailsViewModel initViewModel() {
        return new RiskAssessmentDetailsViewModel(this);
    }

    @Override
    public int appTheme() {
        return Constants.THEME_FULL;
    }

    @Override
    public void initData() {
        super.initData();
        setStatusBar();
        initTitle(this, "风险研判报告");

        showView((RiskManagementBean) getIntent().getSerializableExtra(Constants.BUNDLE_EXTRA));
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.titleRight:
                switchActivity(RiskAssessmentCreateActivity.class);
                break;
            default:
                break;
        }
    }


    @Override
    protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (resultCode == RESULT_OK) {
            switch (requestCode) {
                default:
                    break;
            }
        }
    }

    private void showView(RiskManagementBean bean) {
        id = bean.getId();
    }


}
